from rest_framework.pagination import PageNumberPagination


class MyPagination(PageNumberPagination):
    page_size = 5
    page_query_param = 'page'  # /?page=4/  查询第几页的参数
    page_size_query_param = 'size'    # /?page=3&size=4/ 查询第三页，每页显四条参数
    max_page_size = 5        #   /最大页数不超过5条